$().ready(function(){
    var nav = getSearch('nav');
    var id = getSearch('id');
    var navList = {};
    for(let i in mainList){
        if(nav == mainList[i].id){
            navList = mainList[i];
        }
    }
    var item = getSearch('item');
    // console.log(item);
    var navItem = '';
    for(let j in navList.list){
        if(item == navList.list[j].id){
            navItem = navList.list[j];
        }
    }

    var breadcream = '<a href="index.html">首页</a>';
    breadcream += '<a href="'+navList.link+'?nav='+navList.id+'">'+navList.name+'</a>';
    breadcream += '<a href="">新闻详情</a>';
    $('#breadcream').html(breadcream);
    getAjax('/Api/New/get_jtxw_content',res=>{
        console.log(res);
        let html = '';
        html += '<div class="news-details-title-img"><img src="'+res.title_img+'" alt=""></div>';
        html += '<div class="news-details-title-line"><span class="news-details-send-date">'+res.date+'</span><span class="news-details-title-text" style="margin-left: 0.5rem">'+res.title+'</span></div>';
        html += '<div class="news-details-content">'+res.content+'</div>'
        $('#news-details-main').html(html)
    },{id:id})
})
